<?php
require_once "db/db.php";
function LoginCookie($email, $pass)
	{
$login = DbLogin($email, $pass);
				
	if($login)
	{
		//construct session in new one active
		foreach($login as $values)
		{
			$_SESSION['user_id'] = $values['id'];
			$_SESSION['full_name'] = $values['fullName'];
			
			//image defaulf 
			if($values['image'] == "")
				{
					//is femail
					if($values['gender'] == 0)
						$_SESSION['image'] = "IB7NOFmPw2a.gif";
					//is mail
					else
						$_SESSION['image'] = "UlIqmHJn-SK.gif";
				}
			//image user uploaded	
			else
				$_SESSION['image'] = $values['image'];	
		}											
		 //echo ' <meta http-equiv="refresh" content="0;URL=index.php">';
	}
}
?>